package com.example.webtest.controller;
import com.example.webtest.service.restservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class restTemplateTest {
	@Autowired
	restservice restsrvice;
	@Autowired
    @GetMapping("/name")
	public String getname(){
		String info = restsrvice.getInfo();

		return info;
	}

	@PostMapping("/postmoney")
	public String postmoney(){
		String info = restsrvice.postInfo();
		return info;
	}






}
